# -*- coding: UTF-8 -*-
'''
@Project ：pythonProject 
@File    ：dictDemo6.py
@Author  ：siwei
@Date    ：2023/10/10 22:18 
@other   ：str.print---->print(str)
'''
# 字典生成式,使用字典的内置函数zip()
list1 = ['name','gender','others']
list2 = ['xsw','男','无']
dict1 = {key.upper():value for key,value in zip(list1, list2)}  # 从list1, list2中遍历得到key和value,将key和value作为字典的键和值
print(dict1,type(dict1))